#!/bin/bash
startTime="`date -d "$1"  +%s`"
endTime=`date -d  "$2"  +%s`
task=$3
echo $startTime
echo $endTime
t1=$1
t2=$2
echo $t1
echo $t2
echo $task
#while [ $startTime -lt $endTime ]
#do
#e1='date -d "$2" "+%Y%m%d %H:%M:%S"'
#startt=$s1
#endt=$e1

#echo "start" $startt
#echo "end" $endt

spark-submit --class org.jxkj.app.Application \
--master yarn \
--deploy-mode cluster \
--driver-memory 4g \
--executor-memory 8g \
--executor-cores 10 \
--num-executors 6 \
--conf spark.sql.shuffle.partitions=300 \
--conf spark.sql.autoBroadcastJoinThreshold=104857600 \
--conf spark.default.parallelism=200 \
--conf spark.driver.memoryOverhead=4G \
--conf spark.network.timeout=120s \
--conf spark.executor.extraJavaOptions=-Xss4096k \
--conf spark.driver.extraJavaOptions=-Xss4096k \
--conf spark.executor.memoryOverhead=4G \
--conf spark.memory.fraction=0.75 \
--conf spark.memory.storageFraction=0.1 \
--conf spark.maxRemoteBlockSizeFetchToMem=10m \
--conf spark.yarn.maxAppAttempts=1 \
/root/gzb/gzbDataAnalyse-1.0-SNAPSHOT-jar-with-dependencies-test.jar "${t1}" "${t2}" '1' "${task}" 'all'

startTime=`expr $startTime + 86400` 

#done
